xl: Do not duplicate last line of config file when trying compat mode.
authorKeir Fraser <keir.fraser@citrix.com>
Wed, 3 Feb 2010 09:45:25 +0000 (09:45 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Wed, 3 Feb 2010 09:45:25 +0000 (09:45 +0000)
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/libxl/xl.c

index 694a95036085f35d74759772131694d63cccb1c0..823c8177ecc12fd1f350dd23da18b56cc4248c61 100644 (file)
@@ -344,6 +344,7 @@ static char* compat_config_file(const char *filename)
     }
 
     while (!feof(s)) {
+        buf[0] = 0;
         fgets(buf, size, s);
         while (buf[strlen(buf) - 1] != '\n' && !feof(s)) {
             size += 1024;